package com.zhou.gof.group.abstractfactory.factory;

import com.zhou.gof.group.abstractfactory.abstractfactory.AnimalAbstractFactory;
import com.zhou.gof.group.abstractfactory.mammal.Mammal;
import com.zhou.gof.group.abstractfactory.reptile.Reptile;
import com.zhou.gof.group.abstractfactory.reptile.impl.Lizard;
import com.zhou.gof.group.abstractfactory.reptile.impl.Snake;

/**
 * @author zhoudong
 * @title: ReptileFactory
 * @projectName user-app
 * @description: 爬行动物工厂
 * @date 2019/5/29 13:53
 */
public class ReptileFactory extends AnimalAbstractFactory {
    @Override
    public Mammal getMammal(String mamal) {
        return null;
    }

    @Override
    public Reptile getReptile(String reptile) {
        switch (reptile){
            case "lizard":
                return new Lizard();
            case "snake":
                return new Snake();
            default:
                return new Snake();
        }
    }
}
